<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="applicable-device" content="mobile">
		<meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no,minimal-ui" name="viewport">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta content="telephone=no" name="format-detection">
		<!-- UC默认竖屏` UC强制全屏 -->
		<meta name="full-screen" content="yes">
		<meta name="browsermode" content="application">
		<!-- QQ强制竖屏` QQ强制全屏 -->

		<link rel="stylesheet" href="/static/wap/lib/mui.min.css" />
		<link rel="stylesheet" href="/static/wap/lib/mui.picker.min.css" />
		<link rel="stylesheet" href="/static/wap/lib/mui.poppicker.css" />
		<link rel="stylesheet" href="/static/wap/lib/swiper.min.css" />

		<link rel="stylesheet" href="/static/wap/css/common.css" />
		<link rel="stylesheet" href="/static/wap/css/home.css" />

		<link rel="stylesheet" href="/static/wap/css/reset.css" />

		<script type="text/javascript" src="/static/wap/lib/jquery-2.1.4.js"></script>
		<script type="text/javascript" src="/static/wap/lib/swiper-3.4.2.min.js"></script>
		<script type="text/javascript" src="/static/wap/lib/mui.min.js"></script>
		<script type="text/javascript" src="/static/wap/lib/mui.picker.min.js"></script>
		<script type="text/javascript" src="/static/wap/lib/mui.poppicker.js"></script>

		<script type="text/javascript" src="/static/wap/lib/city.data-3.js"></script>

		<script type="text/javascript" src="/static/index/lib/template.js"></script>
	</head>

	<body>

		<div class="swiper-container homeBanner">
			<div class="swiper-wrapper">
				<div class="swiper-slide">
					<img src="/static/wap/images/banner.png" />
				</div>
				<div class="swiper-slide">
					<img src="/static/wap/images/banner.png" />
				</div>
				<div class="swiper-slide">
					<img src="/static/wap/images/banner.png" />
				</div>
			</div>
			<div class="swiper-pagination"></div>
		</div>

		<div class="nav_wrap clearfix">
			<a class="nav_item" href="/wap/quota/index">
				<div class="nav_itemPic one"></div>
				<div class="itemName">获取报价</div>
			</a>
			<a class="nav_item" href="/wap/Standard/index">
				<div class="nav_itemPic two"></div>
				<div class="itemName">资质标准</div>
			</a>
			<a class="nav_item" href="/wap/company/index/1">
				<div class="nav_itemPic three"></div>
				<div class="itemName">代办公司</div>
			</a>
			<a class="nav_item" href="/wap/Consult/index">
				<div class="nav_itemPic four"></div>
				<div class="itemName">行业资讯</div>
			</a>
			<a class="nav_item" href="/wap/user/reg">
				<div class="nav_itemPic five"></div>
				<div class="itemName">我要入驻</div>
			</a>
		</div>

		<div class="bgWhite">
			<div class="titleLine ">免费资讯报价</div>
			<div class="desc_num">已为15204人免费提供了资质服务</div>
		</div>

		<div class="bgWhite">
			<div class="comWrap">
				<input class="ipt_getPrice" type="text" name="" id="name" value="" placeholder="选择输入您的姓名" />
				<input class="ipt_getPrice" type="number" name="" id="phone" value="" placeholder="请输入您的手机号码" />
				<div class="codeBox">
					<input type="text" name="" id="codeNum" value="" placeholder="请输入验证码" class="codeNumBox"/>
					<input type="button" name="" id="sendCode" value="发送验证码" class="sendCodeBox" />
				</div>
				<input class="ipt_getPrice" type="text" name="" id="addressChoose" onclick="chooseArea()" value="" placeholder="选择您您所在的地区" readonly="readonly" />
				<input type="button" class="getPrice" value="立即获取" onclick="getOrder()"/>
				
				<div class="connect_usDesc">或通过以下方式联系我们</div>
				<div class="connect_wrap clearfix">
					<a class="comBgConnec leftTel" href="tel:400-100-8020">400-100-8020</a>
					<a class="comBgConnec rightTel" href="tel:15012121212">15012121212</a>
				</div>
			</div>
		</div>

		<div class="bgWhite">
			<div class="comWrap">

				<div class="titleLine ">最新订单</div>
				<div class="order_home clearfix">
					<div class="top_order_home borderBottom">
						<div class="tap_orderHome">资质类别</div>
						<div class="tap_orderHome">联系电话</div>
						<div class="tap_orderHome">所在地区</div>
						<div class="tap_orderHome">发布时间</div>
					</div>
					<div class="order_home_list borderBottom">
						<div id="orderListHtml"></div>
						<script id="orderListScript" type="text/html">
							{{each list item i}}
								<div class="order_listWrap">
									<div class="tap_orderHome">{{item.category_name}}</div>
									<div class="tap_orderHome">{{item.phone}}</div>
									<div class="tap_orderHome">{{item.address}}</div>
									<div class="tap_orderHome">{{item.create_time}}</div>
								</div>
							{{/each}}
						</script>
					</div>
				</div>

				<div class="hot_company">
					<div class="titleLine ">热门代办</div>
					<div class="swiper-container hotCompany">
						<div class="swiper-wrapper" id="hotCompantHtml"></div>
						<script id="hotCompantScript" type="text/html">
							{{each list item i}}
								<a class="swiper-slide">
									<div class="complogin" style="background: url({{item.logo}}) no-repeat center center;
											 background-size: 100% auto;">
									</div>
									<div class="hotCom_name">{{item.name}}</div>
									<div class="hotNum">咨询：<span>{{item.view_num}}</span></div>
									<div class="zixunBox">立即咨询</div>
								</a>
							{{/each}}
						</script>
						<!--<div class="swiper-button-prev swiper-button-black"></div>
						<div class="swiper-button-next swiper-button-black"></div>-->
					</div>
				</div>

				<div class="titleLine ">行业资讯</div>
				<div class="zixunWrap">
					<div id="inforHtmlTepl"></div>
					<script id="infoScriptTemp" type="text/html">
						{{each list item i}}
						<a href="/wap/Consult/constDetail/{{item.id}}" class="borderBottom zixin_tap">
							<div class="zixun_title">{{item.title}}</div>
							<div class="zixun_sunDesc clearfix">
								<span class="mui-pull-left">{{item.create_time}}</span>
								<span class="mui-pull-right">标签：{{item.tag}}</span>
							</div>
						</a>
						{{/each}}
					</script>
				</div>

			</div>
		</div>

		<div class="footer_bgComp">
			<div class="desc_companyFooter">奇快企服是一个专门为办理建筑方面有困难或者疑问的建筑公司而提供的一个办理各种建筑资资质的服务平台。</div>
		</div>

		{include file="pub/footer"}
		
		<script type="text/javascript" src="/static/index/layer/layer.js"></script>
		<script type="text/javascript" src="/static/wap/js/orderCode.js"></script>

		<script>
			var baseUrl = 'https://api.qikuai100.com/';
			var mySwiper = new Swiper('.homeBanner', {
				autoplay: 5000, //可选选项，自动滑动
				pagination: '.swiper-pagination'
			});

			$(function() {
				initOrderList();
				initHotCompany();
				initInforList();
			});

			mui.init();
			var cityPicker;
			mui(function() {
				cityPicker = new mui.PopPicker({
					layer: 2
				});
				cityPicker.setData(cityData3);
			});
			//选择区域
			function chooseArea() {　　
				cityPicker.show(function(items) {　　 // items为选中的三级区域信息
					var str = items[0].text+'/'+items[1].text;
					$('#addressChoose').val(str);
				});
			}
			//关闭选择器
			function closeChoose() {　　
				cityPicker.hide();
			}

			// 加载首页订单信息
			function initOrderList() {
				$.ajax({
					type: "POST",
					url: baseUrl + "api/order/list",
					data: {
						"page": 1
					},
					success: function(result) {
						if(result.ret == 0) {
							var dataJson = {
								total_orders: result.data.total_orders,
								list: []
							};
							for(var i = 0; i < result.data.list.length; i++) {
								if(i < 4) {
									dataJson.list.push(result.data.list[i]);
								}
							}
							var orderListHtml = template('orderListScript', dataJson);
							document.getElementById('orderListHtml').innerHTML = orderListHtml;
						}
					}
				});
			};

			// 加载资讯信息
			function initInforList() {
				$.ajax({
					type: "POST",
					url: baseUrl + "api/index/news",
					success: function(result) {

						if(result.ret == 0) {
							var dataJson = {
								name: "资讯",
								list: []
							};
							for(var i = 0; i < 4; i++) {
								if(result.data.list[i]) {
									dataJson.list.push(result.data.list[i]);
								}
							}
							console.log(dataJson)
							var inforHtmlTepl = template('infoScriptTemp', dataJson);
							document.getElementById('inforHtmlTepl').innerHTML = inforHtmlTepl;

						}
					}
				});
			};

			// 加载 热门公司
			function initHotCompany() {
				$.ajax({
					type: "POST",
					url: baseUrl + "api/company/list",
					data: {
						"page": 1
					},
					success: function(result) {
						if(result.ret == 0) {
							var dateHot = result.data;
							var hotCompantHtml = template('hotCompantScript', dateHot);
							document.getElementById('hotCompantHtml').innerHTML = hotCompantHtml;
						}
						var mySwiperCompany = new Swiper('.hotCompany', {
							loop: false,
							autoplay: 3500,
							slidesPerView: 2.5,
							speed: 800,
							spaceBetween: 10,
							// nextButton: '.swiper-button-next',
							// prevButton: '.swiper-button-prev',
							onlyExternal: false
						});
					}
				});
			};
		</script>
	</body>

</html>